package com.qf.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class Orders {

    private Integer id;

    private Integer uid;

    private Integer pid;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date time;


    private String num;

    private String price;

    private String state;

    private String evaluation;

    private String o;

    private Integer level;

    private String u_name;

    private String p_name;

    public Orders(Integer id, Integer uid, Integer pid, Date time, String num, String price, String state, String evaluation, Integer level) {
        this.id = id;
        this.uid = uid;
        this.pid = pid;
        this.time = time;
        this.num = num;
        this.price = price;
        this.state = state;
        this.evaluation = evaluation;
        this.level = level;
    }

    public Orders(Integer uid, Integer pid, Date time, String num, String price) {
        this.uid = uid;
        this.pid = pid;
        this.time = time;
        this.num = num;
        this.price = price;
    }

    public Orders(){};

    public Orders(Integer id, Integer uid, Integer pid, String num, String price, String state, String evaluation, String o, Integer level) {
        this.id = id;
        this.uid = uid;
        this.pid = pid;
        this.num = num;
        this.price = price;
        this.state = state;
        this.evaluation = evaluation;
        this.o = o;
        this.level = level;
    }
}
